package rain;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Driver {

	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
		
		// Fetch MessageRenderer implementation
		
		RainForestService service = (RainForestService)context.getBean("rainForestService");
		
		List<String> videoCategories = service.getVideoCategories();
		for (String video : videoCategories) {
			
			System.out.println(video);
		}
		System.out.println("-----------------------------------");
		RainForestService serviceSpringJDBC = (RainForestService)context.getBean("rainForestServiceSpringJDBC");
		
		List<String> videoCategoriesSpringJDBC = serviceSpringJDBC.getVideoCategories();
		for (String video : videoCategoriesSpringJDBC) {
			
			System.out.println(video);
		}

	}
}
